home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 43 / Amiga Format CD43 (1999)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-09].iso / -websites- / wirenet / files / wirenet151.lzx / Updates / ParseThor < prev    next >
Text File  |  1999-05-10  |  2KB  |  58 lines

  1. /* $VER: ParseThor 1.51 (15.09.96) by Neil Bothwick */
  2. /*                                                  */
  3. /* Imports downloaded news and mail into Thor       */
  4.  
  5. /* Change these to suit your setup */
  6.  
  7. System = 'Wirenet'                  /* The name of your Internet system in Thor */
  8.  
  9. /* Don't change anything below here */
  10.  
  11. options results
  12. address command
  13.  
  14. if ~show('p', 'BBSREAD') then do
  15.     'run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead'
  16.     'WaitForPort BBSREAD'
  17.     end
  18.  
  19. if ~show('L','rexxsupport.library') then
  20.     if ~addlib('rexxsupport.library',0,-30) then exit
  21.  
  22. if ~show('L','rexxdossupport.library') then
  23.     if ~addlib('rexxdossupport.library',0,-30) then exit
  24.  
  25. drop BBS.                           /* Get the path fo System data */
  26. address BBSREAD
  27. GETBBSDATA '"'System'"' stem BBS
  28. SystemDir = BBS.BBSPATH
  29. TempDir   = SystemDir'tcp_tmp'
  30. TempBak   = SystemDir'tcp_tmp.bak'
  31.  
  32. address command
  33. /* Make backup copy of batch and progress files */
  34. if exists(TempDir) then do
  35.     if ~exists(TempBak) then 'makedir' TempBak
  36.     'copy' TempDir'/#? to' TempBak 'QUIET'
  37.     end
  38.  
  39. /* Unbatch news and mail */
  40. if exists(TempDir'/m.0') then do
  41.     if word(statef(TempDir'/m.0'),2) >0 then do
  42.         say 'Unbatching mail/news...'
  43.         GetVar('Thor/ThorPath')||'bin/GetTCP BBSNAME' System 'SOCKETS 10 PUBSCREEN Workbench PARSEONLY'
  44.         'setenv NewMail TRUE'
  45.         end
  46.     else 'unsetenv NewMail'
  47.     end
  48.  
  49. do i=0 to 9
  50.     if exists(TempDir'/n.'i) then do
  51.         say 'Unbatching news...'
  52.         GetVar('Thor/ThorPath')||'bin/GetTCP BBSNAME' System 'SOCKETS 10 PUBSCREEN Workbench PARSEONLY'
  53.         end
  54.     end
  55.  
  56. exit
  57.  
  58.